﻿@model EditTrendViewModel

@{
    string returnListUrl = ViewBag.ReturnListUrl;
    List<SelectListItem> propertyTypeDDL = ViewBag.PropertyTypeDDL;

    ViewBag.Title = "Xu hướng  " + Model.Name;
}

<section class="content-header">
    <h1>
        Xu hướng 
        <small>@Model.Name</small>
    </h1>
    <ol class="breadcrumb">
        <li>
            <a href="@Url.Action("Index", "Home")">
                <i class="fa fa-home"></i> Trang chủ
            </a>
        </li>
        <li>
            <a href="@Url.Action("Index", "Trend")">
                Danh sách xu hướng 
            </a>
        </li>
        <li class="active">@Model.Name</li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-6">
            @using (Html.BeginForm("Edit", "Trend", FormMethod.Post, new { enctype = "multipart/form-data" }))
            {
                @Html.AntiForgeryToken()
                @Html.ValidationSummary(true, "")
                @Html.HiddenFor(m => m.Id)
                @Html.Hidden("ReturnListUrl", returnListUrl)

                <div class="box box-solid">
                    <div class="box-body">
                        <div class="form-group">
                            @Html.LabelFor(m => m.Name, new { @class = "control-label" })
                            @Html.TextBoxFor(m => m.Name, new { @class = "form-control" })
                            @Html.ValidationMessageFor(m => m.Name)
                        </div>
                        <div class="form-group">
                            @Html.LabelFor(m => m.TypeImage, new { @class = "control-label" })
                            <input name="TypeImage" type="file" class="form-control" accept="image/*">
                            @Html.ValidationMessageFor(m => m.TypeImage)
                        </div>
                        <div class="form-group">
                            @Html.LabelFor(m => m.ContentImage, new { @class = "control-label" })
                            <input name="ContentImage" type="file" class="form-control" accept="image/*">
                            @Html.ValidationMessageFor(m => m.ContentImage)
                        </div>
                    </div>
                    <div class="box-footer text-right">
                        <a href="@(returnListUrl ?? Url.Action("Index", "Trend"))" class="btn btn-default pull-left">
                            <i class="fa fa-chevron-left fa-mr"></i> Back to List
                        </a>
                        <button type="reset" class="btn btn-warning">
                            <i class="fa fa-refresh fa-mr"></i> Refresh
                        </button>
                        <button type="submit" class="btn btn-success">
                            <i class="fa fa-check fa-mr"></i> Xác nhận
                        </button>
                    </div>
                </div>
            }
        </div>
    </div>
</section>

@section scripts{
    <script>
        ActiveMenu('#trend-menu');
    </script>
}